import request from '@/router/axios'

export function fetchWxMaterialList(query) {
  return request({
    url: '/mp/wxmaterial/page',
    method: 'get',
    params: query
  })
}

export function addWxMaterialObj(obj) {
  return request({
    url: '/mp/wxmaterial',
    method: 'post',
    data: obj
  })
}

export function getWxMaterialObj(id) {
  return request({
    url: '/mp/wxmaterial/' + id,
    method: 'get'
  })
}

export function delWxMaterialObj(id) {
  return request({
    url: '/mp/wxmaterial/' + id,
    method: 'delete'
  })
}

export function putWxMaterialObj(obj) {
  return request({
    url: '/mp/wxmaterial',
    method: 'put',
    data: obj
  })
}

// 删除图片
export function WxMaterialDel(obj){
  return request({
    url: '/mp/wxmaterial/deleteImageByMediaIds',
    method: 'post',
    data: obj
  })
}
